<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateWechatMenuTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('wechat_menu', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('group')->unsigned()->index('group_index')->comment('公众号ID');
			$table->integer('parent')->default(0)->comment('父id');
			$table->string('name')->comment('菜单名称');
			$table->string('type')->comment('类型');
			$table->text('data', 65535)->nullable()->comment('附加内容');
			$table->integer('order')->default(0)->comment('排序');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('wechat_menu');
	}

}
